package com.yanqu.road.server.cmd.monopolymarket.fortress;

import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.monopolymarket.MonopolyMarketMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;
import com.yanqu.road.utils.date.DateHelper;
import io.netty.channel.ChannelHandlerContext;

/**
 * @Description
 * @Author cwq
 * @Data 2021/10/20 11:43
 */
@Cmd(code = GameProtocol.S_MONOPOLY_MARKET_FORTRESS_LOCK_UNION_SUCCESS_FROM_CROSS, desc = " 边关要塞 锁定联盟数据反馈 跨服返回区服 协议")
public class MonopolyMarketFortressLockSuccessFromCrossCmd implements Command {


    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        if (MonopolyMarketMgr.group == null) {
            return;
        }
        MonopolyMarketMgr.logger.info("收到跨服锁定联盟成员的消息，上次锁定的时间为：{}",MonopolyMarketMgr.group.getFortressLockJoinUnionMemberLastTime());
        // 锁定联盟中参赛的玩家 锁定联盟数据
        MonopolyMarketMgr.group.setFortressLockJoinUnionMemberLastTime(DateHelper.getCurrentSecond());
    }
}
